Method and apparatus for supporting machine learning algorithms and data pattern matching in ethernet ssd

ABSTRACT

A data storage device includes a memory array for storing data; a host interface for providing an interface with a host computer running an application; a central control unit configured to receive a command in a submission queue from the application and initiate a search process in response to a search query command; a preprocessor configured to reformat data contained in the search query command and generate a reformatted data; and one or more data processing units configured to extract one or more features from the reformatted data and perform a data operation on the data stored in the memory array in response to the search query command and return matching data from the data stored in the memory array to the application via the host interface.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation application of U.S. patentapplication Ser. No. 15/472,061 filed Mar. 28, 2017, which claims thebenefits of and priority to U.S. Provisional Patent Application Ser. No.62/441,073 filed Dec. 30, 2016, the disclosures of which areincorporated herein by reference in their entirety.

TECHNICAL FIELD

The present disclosure relates generally to data storage devices, andmore particularly to data storage devices that are capable of performingdata matching and machine learning on the data stored thereon.

BACKGROUND

Non-volatile memory (NVMe) over Fabrics (NVMeoF) is a new industrystandard. NVMeoF defines a common architecture that supports an NVMeblock storage protocol over a wide range of storage networking fabricssuch as Ethernet, Fibre Channel, InfiniB and, and other network fabrics.For an NVMeoF-based system, an X86-based central processing unit (CPU)on a motherboard is no longer required to move data between an initiator(e.g., host software) and a target device (i.e., an NVMeoF device)because the target device is capable of moving data by itself. The term,fabric, represents a network topology in which network nodes can passdata to each other through a variety of interconnecting protocols,ports, and switches. For example, Ethernet-attached SSDs may attachdirectly to a fabric, and in this case the fabric is the Ethernet.

The standard form factor of NVMeoF devices is the same or very similarto the standard solid-state drive (SSD) and hard disk drive (HDD) toenable quick and easy deployment in existing rack systems in anenterprise or a datacenter. The NVMeoF devices provide high capacity,low latency data storage and operation environment for enterprise ordatacenter applications.

The NVMeoF devices are not optimized for data-centric applications suchas machine learning and data mining applications. Currently, NVMeoFdevices including fabric-attached SSDs (eSSDs) merely respond to arequest by an application running on a host computer and provide datarequested by the application or perform only basic operations on thedata stored thereon. Most of the data matching or machine learningcapabilities are performed by CPUs and/or graphics processing units(GPUs) on a host computer that are external to the NVMeoF devices.

SUMMARY

According to one embodiment, a data storage device includes a memoryarray for storing data; a host interface for providing an interface witha host computer running an application; a central control unitconfigured to receive a command in a submission queue from theapplication and initiate a search process in response to a search querycommand; a preprocessor configured to reformat data contained in thesearch query command based on a type of the data and generate areformatted data; and one or more data processing units configured toextract one or more features from the reformatted data and perform adata operation on the data stored in the memory array in response to thesearch query command and return matching data from the data stored inthe memory array to the application via the host interface.

A method for operating a data storage device includes: receiving acommand in a submission queue from an application running on a hostcomputer; initiating a search process in response to a search querycommand; generating a reformatted data by changing a format of datacontained in the search query command based on a type of the data;extracting one or more features from the reformatted data; performing adata operation on data stored in a memory array of the data storagedevice in response to the search query command; and returning matchingdata from the data stored in the memory array to the application via ahost interface established between the host computer and the datastorage device.

The above and other preferred features, including various novel detailsof implementation and combination of events, will now be moreparticularly described with reference to the accompanying figures andpointed out in the claims. It will be understood that the particularsystems and methods described herein are shown by way of illustrationonly and not as limitations. As will be understood by those skilled inthe art, the principles and features described herein may be employed invarious and numerous embodiments without departing from the scope of thepresent disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are included as part of the presentspecification, illustrate the presently preferred embodiment andtogether with the general description given above and the detaileddescription of the preferred embodiment given below serve to explain andteach the principles described herein.

FIG. 1 shows a block diagram of an example data storage device,according to one embodiment;

FIG. 2 is a block diagram illustrating a behavioral view of an exampleneural code accelerator, according to one embodiment;

FIG. 3 shows an example GPU configured to implement one or moreconvolution engines (CEs), according to one embodiment;

FIG. 4 shows an example data storage device including an XOR engine,according to one embodiment;

FIG. 5 shows an example data storage device including a GPU for machinelearning, according to one embodiment; and

FIGS. 6A and 6B show a flowchart for an example image search query andretrieval process, according to one embodiment.

The figures are not necessarily drawn to scale and elements of similarstructures or functions are generally represented by like referencenumerals for illustrative purposes throughout the figures. The figuresare only intended to facilitate the description of the variousembodiments described herein. The figures do not describe every aspectof the teachings disclosed herein and do not limit the scope of theclaims.

DETAILED DESCRIPTION

In an embodiment of the present disclosure, a data storage devicecapable of data matching and machine learning is disclosed. Machinelearning can include algorithms that can learn from data includingartificial intelligence, getting computers to act without beingexplicitly programmed, automated reasoning, automated adaptation,automated decision making, automated learning, the ability for acomputer to learn without being explicitly programmed, artificialintelligence (AI), or combination thereof. Machine learning can beconsidered a type of artificial intelligence (AI). Machine learning caninclude classification, regression, feature learning, online learning,unsupervised learning, supervised learning, clustering, dimensionalityreduction, structured prediction, anomaly detection, neural nets, orcombination thereof.

In an embodiment of the present disclosure, a learning system caninclude machine learning systems that can process or analyze “big data.”Parallel or distributed storage devices with in-storage-computing (ISC)can accelerate big data machine learning and analytics. The parallel ordistributed learning system can offload functions to ISC for additionalbandwidth and reduce input and output (I/O) for the storage and hostprocessor. This parallel or distributed learning system can providemachine learning with ISC.

In an embodiment of the present disclosure, a parallel or distributedlearning system can be implemented with in-storage-computing (ISC), ascheduler, or combination thereof. ISC can provide significantimprovements in the learning system including parallel or distributedlearning. ISC can provide another processor for machine learning, anaccelerator for assisting a host central processing unit, or combinationthereof, such as preprocessing at an ISC to relieve a bandwidthbottleneck once detected. The scheduler can intelligently assign data,tasks, functions, operations, or combination thereof.

The following embodiments are described in sufficient detail to enablethose skilled in the art to make and use the present disclosure. It isto be understood that other embodiments would be evident based on thepresent disclosure, and that system, process, or mechanical changes maybe made without departing from the scope of an embodiment of the presentdisclosure.

In the following description, numerous specific details are given toprovide a thorough understanding of the present disclosure. However, itwill be apparent that the present disclosure may be practiced withoutthese specific details. In order to avoid obscuring an embodiment of thepresent disclosure, some well-known circuits, system configurations, andprocess steps are not disclosed in detail.

The drawings showing embodiments of the system are semi-diagrammatic,and not to scale and, particularly, some of the dimensions are for theclarity of presentation and are shown exaggerated in the drawingfigures. Similarly, although the views in the drawings for ease ofdescription generally show similar orientations, this depiction in thefigures is arbitrary for the most part. Generally, the presentdisclosure can be operated in any orientation. The embodiments have beennumbered first embodiment, second embodiment, etc. as a matter ofdescriptive convenience and are not intended to have any othersignificance or provide limitations for an embodiment of the presentdisclosure.

According to one embodiment, a host computer and one or more datastorage devices can collectively perform data matching or machinelearning operations. Depending on the datasets and the algorithms thatare employed, the data matching or machine learning operations can bepartitioned into host operations and device operations. The partitioninginto the host operations and the device operations can depend on theoptimization of a computational time and power efficiency for operatingon a specific usage model. If a specific part of the data matching ormachine learning operations performed by a subsystem (either the hostcomputer or the data storage device) can result in a faster and moreefficient execution, that specific part of the operations can bepartitioned into the corresponding subsystem.

For example, in a facial recognition operation, the dataset of trainedfaces may be stored in a data storage device. The dataset of trainedfaces may include binary codes or feature vectors extracted from thetrained face images. For training of a new face, the entire or a part ofthe newly trained facial dataset or data model can be copied from thedata storage device to a memory of the host computer. The host computercan perform the new facial training operation using the dataset copiedto the host computer's memory. That is, the data storage device mayreceive the data of the new face and send corresponding neural binarycodes or feature vectors to facilitate the new facial training operationperformed by the host computer. Once a new facial recognition model iscompleted, the host computer can keep the newly trained facialrecognition model in the host computer's memory for an additionaltraining or copy the newly trained facial recognition model back to thedata storage device to update the dataset of trained faces. This processcan repeat for a newly received facial dataset and training for a newmodel based on the facial dataset.

According to one embodiment, the host computer can perform the datamatching or machine learning operations in a framework that supportscoordination with the data storage device that stores the dataset. Theperformance of the framework can be highly dependent on the usage modeland deployment parameters, such as a size of the images, a number oftraining iterations, a size of the dataset, a training algorithm, afloating-point performance, etc. For example, in the case of facialrecognition, the size of the dataset of trained faces may get largerover time. Because the memory of the host computer is costly, the datastorage device can partially or fully perform the facial recognitionoperation instead of copying the dataset stored in the data storagedevice to the memory of the host computer to perform the data matchingor machine learning operations in the host computer.

According to one embodiment, the present disclosure provides a datastorage device that can internally perform data matching or machinelearning operations. The data storage device can be any of a solid-statedrive (SSD), a hard disk drive (HDD), an NVMe device that is compatiblewith the NVMe standard, an NVMeoF device that is compatible with theNVMeoF standard, or any other fabric-attached SSDs (eSSDs). It is notedthat any other type of devices that can store data and perform datamatching or machine learning can be used without deviating from thescope of the present disclosure.

FIG. 1 shows a block diagram of an example data storage device,according to one embodiment. The data storage device 100 includes acentral control unit (CCU) 111, a preprocessor 112, an embedded DRAM113, a signature thresholding engine 114, a direct memory access (DMA)engine 115, a controller 116, an input buffer 117, a weight buffer 118,an output buffer 119, one or more processing units 120, and a memoryarray 130. Various images, text, video, audio, or other data can bestored in the memory array 130. Although the memory array 130 is shownto be local to the data storage device 100, it is noted that the memoryarray 130 can be remotely connected to the data storage device 100 viathe fabrics such as the Ethernet. For example, the memory array 130 canbe a flash array that may reside in another NVMeoF device. Inparticular, according to the NVMeoF standard, the placement and physicalattachment of the memory array 130 may not be a physical limitation inthat the data stored in the memory array 130 can be accessed by any hostcomputer accessible by the NVMeoF protocols. In this way, the controller116 and the one or more data processing units 120 of one data storagedevice can operate on data stored in the memory array 130 of itself oranother data storage device over the fabrics.

According to one embodiment, the data storage device 100 can beintegrated circuits, integrated circuit cores, integrated circuitcomponents, microelectromechanical system (MEMS), passive devices, or acombination thereof having a form factor compatible with the NVMe and/orNVMeoF standards. However, it is noted that various form factors of thedata storage device 100 can be used without deviating from the scope ofthe present disclosure.

According to one embodiment, the data storage device 100 is an NVMeoFdevice, and the connection between a host computer (not shown) and thefabric attached to the NVMeoF device is an Ethernet connection. In thiscase, the host computer can send NVMeoF commands directly to the NVMeoFdevice over the Ethernet connection. It is noted that various otherfabrics such as Fibre Channel, InfiniB and, and other network fabricscan be used to establish the communication between the data storagedevice 100 and the host computer.

The data storage device 100 can receive a command 150 from anapplication running on the host computer. According to one embodiment,the command 150 can be a vendor-specific fabric command (e.g., an NVMeoFcommand). The command 150 can be a normal read/write operation command,an image search inquiry command, or a machine learning command tooperate on the data stored in the memory array 130. The command 150 canbe received in a submission queue (SQ). One submission queue can includeseveral commands 150. In some embodiments, a single submission queue caninclude the same or similar type of commands 150, for example,read/write operation commands. Similar or same commands 150 can besorted by the application and packaged in different submission queuesfor efficient delivery and processing of the commands 150.

The controller 116 is configured to perform various data operationsincluding data matching and/or machine learning operations on the datastored in the memory array 130. For example, the controller 116 can runa state machine or perform data matching operations in conjunction withthe CCU 111. The data storage device 100 can internally perform the dataoperations with no or minimal interaction with the application or withthe host computer. In this case, the latency to complete the requestedoperation can be improved with less power consumed due to less datamovement between the host and the data storage device. When therequested data operation is completed, the data storage device 100provides the matching data to the application running on the hostcomputer.

According to one embodiment, the CCU 111 can decode the command 150received from the host computer and generate one or more neural binarycodes for internal and external consumption. For example, in response toan image search query command including an image data, the CCU 111initializes the preprocessor 112 to operate on the received image data.In some embodiments, the data storage device 100 can receive only thecommand 150 from the application to perform a data operation on thedataset that are stored in the memory array 130 instead of receivingboth the command and dataset from the host computer. Examples of suchdata include but are not limited to, image data, text data, video data,and audio data. For example, for image data, the preprocessor 112 canconvert the format of the image data and create a fixed-size RGB formatdata. The converted image data in the RGB format may further be scaledup or down for facilitating the extraction of various features from theimage data. The analysis-ready fixed-size image data are saved in theDRAM 113 for the data operation as instructed by the command 150.

According to one embodiment, the data processing unit 120 is a neuralcode accelerator. Several data processing units 120 may be required forprocessing data on each of the received image data. For example, if tenimages are received from the application in the command 150, a total often data processing units 120 can be invoked by the CCU 111. The numberof invoked data processing units 120 may not necessarily match thenumber of received image data. Depending on the current workload and theavailability of the data processing units 120, the CCU 111 can invoke acertain number of data processing units 120. In some embodiments, thedata processing can be divided, grouped, or work in parallel or inseries depending on the workload and the availability of the dataprocessing units 120.

According to one embodiment, each of the data processing units 120 canincorporate one or more convolution engines (CEs). The image data (e.g.,a facial image) received from the application are input to the dataprocessing units 120 in batches, and each of the convolution engines canextract feature sets for each dataset that is grouped in batches. Thefeature sets that are extracted in parallel can be connected based ontheir weights. During the reconnection of the feature sets, theconvolution weight parameters for each feature set can be loaded fromthe DRAM 113 via the weight buffer 118.

The data processing unit 120 can also have adder trees and optionalpooling, and a rectified linear unit 121 to compute and connect thefeature sets to compute the fully-connected neural layers. Using thefully-connected neural layers, herein also referred to as convolutionneural network (CNN) layers, the data processing unit 120 can generate afeature vector 152 and send the feature vector 152 to the DRAM 113 viathe DMA 115. The feature vector 152 can be converted to binary vectorsand saved to the memory array 130. The feature vector 152 can be fetchedby another processing unit (e.g., the signature thresholding 114) forcompressing the feature vector 152 and comparing the extracted features(e.g., binary codes) with the saved features for the database imagesstored in the memory array 130. For hierarchical data retrieval, bothbinary and actual feature vectors can be saved to the memory array 130.

According to one embodiment, the rectified linear unit 121 implementedin each data processing engine 120 can provide a rectifier by employingan activation function for given inputs received from the associatedconvolution engines. For example, the rectified linear units 12 areapplicable to computer vision using deep neural nets.

FIG. 2 is a block diagram illustrating a behavioral view of an exampleneural code accelerator, according to one embodiment. The neural codeaccelerator 200 includes a convolution and pooling filters 203, a fullyconnected layer 204, and a signature thresholding unit 205. The neuralcode accelerator 200 can optionally have a principal component analysis(PCA) layer 206. The neural code accelerator may be the data processingunit 120 shown in FIG. 1.

The neural code accelerator 200 can receive an input data 201 from adata buffer (e.g., a submission queue) from a host computer or a centralcontrol unit (e.g., CCU 111 shown in FIG. 1). A preprocessor 202 (e.g.,preprocessor 112 shown in FIG. 1) can receive the input data 201. Theinput data 201 can be any type of data including, but not limited to,text, image, video, and audio data. According to some embodiments, thepreprocessor 202 can be a part of or integrated into the neural codeaccelerator 200. For image data, the preprocessor 202 can performinitial processing of input data 201 to convert it to a raw RGB formatand scale the image up or down to a fixed dimension. The convolution andpooling filters 203 can perform data processing on the converted and/orscaled data with a set of convolution filters. The output from theconvolution and pooling filters 203 can be one or more features 207. Thefeatures 207 are fed to the fully connected layer 204. The fullyconnected layer 204 can generate a feature vector 208 based on thefeatures 207 and feed the feature vector 208 to the signaturethresholding unit 205 and optionally to the PCA layer 206. The signaturethresholding unit 205 can generate one or more neural binary codes 210.For example, for an image data that is input to the neural codeaccelerator 200, the fully connected layer 204 can generates the featurevector 208, and the signature thresholding unit 205 can generate theneural binary codes 210 by finalizing activations of the feature vector208 based on a predetermined threshold. The threshold may be fine-tunedby a user, training, or machine learning. The PCA layer 206 can condensethe output feature vector 208 to generate compressed feature vectors211.

According to one embodiment, the convolution engines can internallyperform data matching and/or deep learning operations inside a datastorage device. For example, the data storage device can have aplurality of GPUs, and each of the GPUS can include one or moreconvolution engines that are grouped in an input layer, a hidden layer,and an output layer.

FIG. 3 shows an example GPU configured to implement one or moreconvolution engines (CEs), according to one embodiment. The GPU 300 canrun one or more CEs that are pre-programmed with fixed algorithms suchas K-means or regression. A first group of the CEs are implemented as aninput layer 301, a second group of the CEs are implemented as a hiddenlayer 302, and the third group of the CEs are implemented as an outputlayer 303. The data paths from the input layer 301 to the output layer303 through the hidden layer 302 provide a forward path or an inferencepath. The data paths from the output layer 303 to the input layer 301through the hidden layer 302 provide a backward or training path. Theapplication can directly utilize the GPU 300 without having to downloada specific algorithm because the CEs implemented in the GPU 300 arepreprogrammed with algorithms such as K-means or regression that areapplicable to a variety of analysis and deep learning. The data storagedevice implementing the GPU 300 can be a consumer device or a homedevice that can feature a machine learning capability.

According to one embodiment, the data storage device incorporates anadditional data matching logic (e.g., XOR) and DMA engines. The datastorage device can perform data matching in real time or as a backgroundtask. The application can provide one or more parameters for a matchingdata (e.g., raw binary values) to the data storage device, and the datastorage device can internally execute and complete the pattern matchingfor the data, and return the matching data stored in the memory array tothe application. In some embodiments, the data storage device can haveone data matching (XOR) engine per bank/channel of a NAND array. Forexample, if the data storage device employs N number of independentchannels/banks of the memory array (e.g., NAND array), a total of N XORengines can be used to match the data from each NAND channel, where N isan integer number.

FIG. 4 shows an example data storage device including an XOR engine,according to one embodiment. The data storage device 400 can be anNVMeoF device that is capable of processing and moving data itself toand from a host computer. The host computer can run an application andcommunicate with the storage device 400 via the fabric interface. Thedata storage device 400 can include a host manager 402 that interfaceswith the host computer via a host interface 401 (e.g., U.2 connector), abuffer manager 403 including a DRAM controller and a memory interface(e.g., DDR3 and DDR4), a memory manager 404 (e.g., flash manager)including a DMA engine 406 and an XOR engine 407, a CPU subsystem 405,and a memory array 410 (e.g., flash memory).

The XOR engine 407 is configured to perform in-line data matching inresponse to a data matching request received from the application. Afterperforming the in-line data matching operation, the data storage device400 can provide the matching data to the requesting application via theconnector 401. The XOR engine 407 may be implemented in an existinghardware logic of the memory manager 404. This is cost effective becausean additional hardware logic to implement the XOR engine 407 is notnecessary. The DMA engine 406 can be used to transfer the matching datato the requesting application.

FIG. 5 shows an example data storage device including a GPU for machinelearning, according to one embodiment. The data storage device 500 canbe an NVMeoF device that is capable of processing and moving data itselfto and from a host computer. The host computer can run an applicationvia the fabrics that provides a communication path with the data storagedevice 500. The data storage device 500 can include a CPU subsystem 505,a host manager 502 that interfaces with the host computer via a hostinterface 501 (e.g., U.2 connector), a buffer manager 503 including aDRAM controller and a memory interface (e.g., DDR3 and DDR4), and amemory manager 504 (e.g., flash manager) including a DMA engine 506, anXOR engine 507, and one or more GPUs 508 a-508 n. The memory manager 504can control access to the memory array 510 (e.g., flash memory) usingthe DMA engine 506, the XOR engine 507, and the GPUs 508. The GPUs canbe configured to function as a convolution engine (CE) in an inputlayer, a hidden layer, and an output layer as shown in FIG. 3. The datastorage device implementing the GPUs can be a consumer device or a homedevice that can feature a machine learning capability.

According to one embodiment, the present data storage device can storeimages in the memory array and internally run an image retrievalapplication in response to an image retrieval request from a hostcomputer. In other embodiments, the storage device may store other typesof data, such as text, audio, or video, among others. Herein, the caseof image data will be used an example. One skilled in the art willrecognize that the teachings are applicable to other data types as well.

According to one embodiment, the data storage device extract featuresfrom a received image data using one or more convolution neural network(CNN) engines. Referring to FIG. 1, the CNN refers to the collection ofthe convolution engines contained in the data storage device 100. Thememory array 130 of the data storage device 100 can contain images withsearchable image descriptor index values and other values to computeHamming distances with respect to a requested image data during an imagequery search and retrieval process.

The CNN engines can create a binary neural code (herein also referred toas a binary key) that can be used for interrogation and/or comparisonagainst the database images stored in the data storage device. In oneembodiment, the binary neural code refers to a key that is stored in ametadata of each stored image data. The CNN engines can provide a key ofbetter quality. In one embodiment, the key can be created by deeplearning performed elsewhere to generate a partial result. As more deeplearning or image processing occurs, more refined keys can be generated,and the image retrieval process be become faster and more efficient.

According to one embodiment, the creation of the binary keys can usevarious forms, sizes, and types of the input data. For example, thepreprocessor of the data storage device can convert the format of aninput image to a fixed sized format (e.g., RGB 256×256 bitmap). Forother types of data (such as text, audio, or video data), otherreformatting or normalization process may be done by the pre-processorto format the input data, depending on the data type, and as would berecognized by one having skill in the art. The preprocessed input image(or other data) is fed to the CNN engines. The CNN engines process theinput image, loop iteratively, extracting one or more binary codes. Theextracted binary codes are placed in the metadata of associated with theinput image (or other data) for searching and selecting matching datastored in the data storage device.

According to one embodiment, the search and the selection process canaccept a search value, create a search signature, and compare the searchsignature with an existing signature. In one embodiment, the searchprocess can calculate Hamming distances, and select matching data thathas a Hamming distance less than a threshold value. The binary searchand selection algorithm based on a k-nearest neighbor search in aHamming space is well known in the art, for example, in an articleentitled “Fast Exact Search in Hamming Space with Multi-Index Hashing”IEEE Transactions on Pattern Analysis and Machine Intelligence archive,volume 36 Issue 6, June 2014, page 1107-1119.

FIGS. 6A and 6B show a flowchart for an example image search query andretrieval process, according to one embodiment. An application 600submits a sample image a data storage device. The application 600submits a search request to the data storage device by placing an imageand associated query information in a submission queue (SQ).

A submission queue can include several search requests submitted fromthe application 600, and the application 600 can submit severalsubmission queues to the data storage device. The submission queues canbe submitted to the data storage device in various ways. For example,the submission queues can be consumed by the data storage device on apredetermined interval or on a first-come first-serve basis. In anotherexample, the data storage device can be notified that the submissionqueues are ready for serving via a message from the application 600, andthe data storage device can serve the submission queues one at a time.Depending on the urgency or priority, submission queues can bereordered, and search requests in a submission queue can be reordered.

A submission queue from the application 600 can include a commandassociate with a request contained in the submission queue. For example,the data storage device is an NVMeoF device, and the NVMeoF devicedetermines that the command is an NVMeoF command for an image searchquery (601). The NVMeoF device can receive various NVMeoF commands fromthe application, and the NVMeoF device can determine an image searchquery from the received NVMeoF commands for further processing.

According to one embodiment, the data storage device can arbitrate amongthe submission queues received from the application 600 (602). In oneembodiment, the arbitration and the subsequent selection of anassociated command can be performed by a central control unit 111 shownin FIG. 1. The arbitration by the data storage device determines asubmission queue to extract from the submission queues. Once asubmission queue is extracted by arbitration, the data storage devicedetermines a proper I/O request command to process the request containedin the submission queue (603). If the I/O request command to process thesubmission queue is an image search query command (604), the datastorage device starts a preprocessing process 606 to retrieve imagesthat matches the image search request. In one embodiment, thepreprocessing process 606 is performed by an integrated preprocessor,for example, the preprocessor 112 shown in FIG. 1. If the I/O requestcommand to process the submission queue is not an image search querycommand, for example, a read/write request to the data stored in thedata storage device, the data storage device treats the requestassociated with the submission queue as a normal request and processesit normally (605).

According to one embodiment, the data storage device preprocesses theimage search request to reduce the size of the image received in thesubmission queue to a normalized format in preparation for processing.For example, the data storage device converts the image from a YUV colorformat to a RGB color format and further scales the converted image to a256×256 pixel image (607). The data storage device can further convertthis intermediate image to a monochromatic bitmap image and sharpenedges to generate a normalized image (608). The data storage deviceplaces the normalized image and associated search criteria into an inputbuffer (609) to start a feature extraction process 610.

The feature extraction process 610 starts with an activation of a CNNengine that is internal to the data storage device (611). For example,the CNN engine corresponds to the convolution engine shown in FIG. 1.The CNN engine submits the normalized image to one or more proceduralreduction layers, herein referred to as CNN layers, to extract specificfeatures from the normalized image. For each CNN layer, the CNN enginecomputes a neural descriptor (613), compresses the neural descriptor(614), and stores the result in an output buffer (615). These processes613-615 iteratively continue for all CNN layers.

When all the CNN layers are complete (612), the data storage device(e.g., the processing unit 120 of FIG. 1 or the CNN engine) initiates asearch process 616. The search process 616 starts with fetching an imagefrom the dataset stored in the data storage device (618). After fetchingthe image, the search process 616 parses metadata from the fetched image(619) and extracts stored features (620). The stored features for thefetched image can be partial features extracted by the extractionprocess 610. The search process 616 utilizes the extracted features inthe feature extraction process 610 as key values in combination with thequery's associated search criteria.

The data storage device can successively examine candidate databaseimages from the dataset stored in the memory array of the data storagedevice, compare the stored features (e.g., keys) of the candidatedatabase images with the extracted features of the image data in thefeature extraction process 610 based on the search criteria (621) andcalculate Hamming distances to determine a closeness of match for eachof the candidate database images (622). The calculated Hamming distancesare stored in an output buffer (623) for a selection process 624. Theseprocesses 618-623 repeat to generate a list of candidate query responsesthat the data storage device can algorithmically examine using Hammingdistances as closeness of match.

The search process 616 can process search queries in various waysdepending on various parameters including, but not limited to, the sizeof the dataset and a number of nearest matches to return. According toembodiment, the search process 616 searches binary codes. For example,the search process 616 uses a search query's K-nearest neighbors (Kbeing a number of nearest neighbors) within a Hamming distance for abinary code similarity measure. Binary codes are not necessarilydistributed uniformly over a Hamming's space. Therefore, the searchprocess 616 may not be able to set a fixed Hamming radius to ensurefinding of the K number of matching data. The maximum Hamming radiusused in the search process 616 may depend on the K data, the length ofthe binary code, and the image query. Generally, the longer the binarycode is, the larger maximum radius is.

According to one embodiment, the search process 616 can employ severalmethods to ensure finding of the K data. In describing the searchprocess 616, the following terminology will be used in accordance withthe definitions set out below. Q is a length of a binary code, S is asubstring of the binary code, R is a Hamming radius, N is a size of thedataset size, and K is a number of nearest neighbors to search or beingsearched.

According to one embodiment, the search process 616 applies a parallellinear scan with or without re-ranking. During the parallel linear scan,the search process 616 compares all binary codes until the K number ofneighbors with less than the Hamming radius R is searched. For example,an optimal Hamming radius R can be obtained by:

[R−log 10(K)]/Q≅0.1.

However, the search process 616 may tweak and adapt the constant 0.1based on the dataset and the search criterion. For example, if a binarycode is 64-bit long and the search process 616 searches for 10 nearestneighbors, the search process 616 can collect data with a Hammingdistance up to:

R−log(10)=0.1*64−>R=7.

In another example, if a binary code is 128-bit long, and the searchprocess 616 searches for 1000 nearest neighbors, the search process 616can collect data with a Hamming radius up to:

R−log(1000)=0.1*128 −>R=15.

In this case, the search process 616 may or may not return the 1000nearest neighbors because the search process 616 is greedy to find thefirst K neighbors. Although this process may not be efficient, thisprocess be the simplest approach requiring the least storage space forthe binary codes and the image's address. In one embodiment, the searchprocess 616 may employ multiple parallel XOR engines to work ondifferent binary code chunks to facilitate the search process toefficiently and quickly searches for the matching data.

According to one embodiment, the search process 616 uses a single hashtable. If a short binary code length (e.g., 16 to 32 bits) is used, andif the dataset is large (e.g., larger than 10{circumflex over ( )}9images), the search process 616 can use a single hash table for binarycode indexing. The search process 616 searches for the entries that havethe same binary code and a Hamming radius of 1. In this case, manyentries might be empty.

According to one embodiment, the search process 616 uses a multi-indexhash table. In this case, the search process 616 can create multiplesmall hash tables and index them based on binary code substrings. In oneembodiment, the search process 616 divides Q bits of the binary code toM disjoint substrings. The substring length S is chosen by and (N)where:

S=log 2(N=M=Q/S.

When a search query arrives, the search process 616 checks the querybinary code with all M hash tables. In each hash table, the searchprocess 616 can check entries with the R′=R/M distance.

For example, the dataset includes approximately 2 million images, and a64-bit binary code is used, and the search process 616 searches for 100nearest neighbors. In this case, the search process 616 divides thebinary code into 21 (log₂(2M)) bit substrings, and 3 hash tables arerequired. The optimal R value can be obtained by: R=0.1*64+log 10(100)=9bits, and R′ can be 9/3=3. In this case, the query binary code isdivided into 3 pieces, and the search process 616 searches for a Hammingradius of 3 in each hash table.

According to one embodiment, the data storage system can include aplurality of data storage devices. A front-end data storage device canact like a cache and keep the hash tables. Based on the returned datafrom searching the hash tables, the search process 616 can access themain data storage for retrieving images that matches the image searchrequest.

After the data storage device examines all the stored candidate images(617), a selection process 624 starts. The selection process 624compares the computed Hamming distances for the candidate images to athreshold value (626). The threshold value used in the selection process624 can be an arbitrary constant or provided with the image searchquery. If the Hamming distance is shorter than the threshold (627), theimage is selected (628), and the selected image is stored in the outputbuffer (629). These processes 625-629 repeat to create a list ofselected images, and the data storage device returns the list to therequesting application 600.

According to one embodiment, a data storage device includes a memoryarray for storing data; a host interface for providing an interface witha host computer running an application; a central control unitconfigured to receive a command in a submission queue from theapplication and initiate a search process in response to a search querycommand; a preprocessor configured to reformat data contained in thesearch query command based on a type of the data and generate areformatted data; and one or more data processing units configured toextract one or more features from the reformatted data and perform adata operation on the data stored in the memory array in response to thesearch query command and return matching data from the data stored inthe memory array to the application via the host interface.

The data storage device may be a non-volatile memory express overfabrics (NVMeoF) device.

The search query command may be an NVMeoF command received over anEthernet connection.

The search query command may include an image data, and the preprocessormay be configured to convert the image data in an RGB format.

The one or more data processing units may be configured to generate aplurality of binary codes corresponding to the one or more extractedfeatures, and store the one or more extracted features in an inputbuffer.

Each of the one or more data processing units may include one or moreconvolution engines (CEs). Each of the one or more convolution enginesmay be configured to extract the one or more features in a convolutionalneural network (CNN) layer.

Each of the one or more convolution engines may be configured to computea neural descriptor for each convolutional neural network (CNN) layer,compress the neural descriptor, and store the one or more extractedfeatures in an output buffer.

The one or more data processing units may further be configured toextract stored features for the data stored in the memory array andcompare the stored features with the extracted features of thereformatted data.

The one or more data processing units may further be configured tocalculate a Hamming distance for each of the data stored in the memoryarray.

The one or more data processing units may further be configured toselect the matching data from the data stored in the memory array basedon the Hamming distance, store the matching data in the output buffer,and transmit the matching data to the application over the hostinterface.

The data storage device may further include a memory manager includingone or more graphics processing units (GPUs) configured to performmachine learning on the data stored in the memory array.

A method for operating a data storage device includes: receiving acommand in a submission queue from an application running on a hostcomputer; initiating a search process in response to a search querycommand; generating a reformatted data by changing a format of datacontained in the search query command based on a type of the data;extracting one or more features from the reformatted data; performing adata operation on data stored in a memory array of the data storagedevice in response to the search query command; and returning matchingdata from the data stored in the memory array to the application via ahost interface established between the host computer and the datastorage device.

The data storage device may be a non-volatile memory express overfabrics (NVMeoF) device.

The search query command may be an NVMeoF command received over anEthernet connection.

The method may further include converting an image data included in thesearch query command in an RGB format.

The method may further include: generating a plurality of binary codescorresponding to the one or more extracted features; and storing the oneor more extracted features in an input buffer.

The features may be extracted using one or more convolution engines(CEs) of the data storage device. Each of the one or more convolutionengines may extract the one or more features in a convolutional neuralnetwork (CNN) layer.

Each of the one or more convolution engines may be configured to computea neural descriptor for each convolutional neural network (CNN) layer,compress the neural descriptor, and store the one or more extractedfeatures in an output buffer.

The method may further include: extracting stored features for the datastored in the memory array; and comparing the stored features with theextracted features of the reformatted data.

The method may further include: calculating a Hamming distance for eachof the data stored in the memory array.

The method may further include: selecting the matching data from thedata stored in the memory array based on the Hamming distance; andstoring the matching data in the output buffer; and transmitting thematching data to the application over the host interface.

The data storage device may further include a memory manager includingone or more graphics processing units (GPUs) configured to performmachine learning on the data stored in the memory array.

The resulting method, process, apparatus, device, product, and/or systemis straightforward, cost-effective, uncomplicated, highly versatile,accurate, sensitive, and effective, and can be implemented by adaptingknown components for ready, efficient, and economical manufacturing,application, and utilization. Another important aspect of an embodimentof the present disclosure is that it valuably supports and services thehistorical trend of reducing costs, simplifying systems, and increasingperformance. These and other valuable aspects of an embodiment of thepresent disclosure consequently further the state of the technology toat least the next level.

While the present disclosure has been described in conjunction with aspecific best mode, it is to be understood that many alternatives,modifications, and variations will be apparent to those skilled in theart in light of the foregoing description. Accordingly, it is intendedto embrace all such alternatives, modifications, and variations thatfall within the scope of the included claims. All matters set forthherein or shown in the accompanying drawings are to be interpreted in anillustrative and non-limiting sense.

What is claimed is:
 1. A data storage device comprising: a memory forstoring data; a host interface compatible with non-volatile memoryexpress over fabrics (NVMeoF) and capable of receiving a command and afirst data associated with the command from an external application; anda processor extracting a feature from the first data, performing a dataoperation on the data stored in the memory based on the command,identifying matching data among the data stored in the memory based onthe feature, and returning the matching data to the external applicationvia the host interface.
 2. The data storage device of claim 1, furthercomprising a preprocessor generating a reformatted data by reformattingthe first data received from host interface based on at least one of thecommand and a type of the first data, and extracting the feature fromthe reformatted data.
 3. The data storage device of claim 2, wherein thefirst data is an image data, and the reformatted data is in ared/green/blue (RGB) format.
 4. The data storage device of claim 1,wherein the data storage device is attachable to a fabric compatiblewith the NVMeoF.
 5. The data storage device of claim 1, wherein theprocessor generates a binary code corresponding to the feature.
 6. Thedata storage device of claim 1, wherein the processor includes aconvolution engine (CE) that extracts the feature in a convolutionalneural network (CNN) layer.
 7. The data storage device of claim 6,wherein the convolution engine computes a neural descriptor for the CNNlayer and compresses the neural descriptor.
 8. The data storage deviceof claim 1, wherein the processor further extracts a stored feature forthe data stored in the memory and compares the stored feature with thefeature of the first data.
 9. The data storage device of claim 8,wherein the processor further calculates a Hamming distance for the datastored in the memory.
 10. The data storage device of claim 9, whereinthe processor further selects the matching data from the data stored inthe memory based on the Hamming distance.
 11. A method comprising:receiving, at the data storage device, a command and a first dataassociated with the command from an external application via a hostinterface between the host computer, the host interface being compatiblewith non-volatile memory express over fabrics (NVMeoF); extracting, inthe data storage device, a feature from the first data; performing, inthe data storage device, a data operation on data stored in a memory ofthe data storage device based on the command; identifying matching dataamong the data stored in the memory based on the feature, and returningthe matching data to the external application via the host interface.12. The method of claim 11, further comprising: generating a reformatteddata by reformatting the first data received from host interface basedon at least one of the command and a type of the first data; andextracting the feature from the reformatted data.
 13. The method ofclaim 11, wherein the first data is an image data, and the reformatteddata is in a red/green/blue (RGB) format.
 14. The method of claim 11,wherein the data storage device is attachable to a fabric compatiblewith the NVMeoF.
 15. The method of claim 11, further comprisinggenerating a binary code corresponding to the feature.
 16. The method ofclaim 11, wherein the feature is extracted using a convolution engine ofthe data storage device, and the convolution engine extracts the featurein a convolutional neural network (CNN) layer.
 17. The method of claim16, wherein the convolution engine computes a neural descriptor for theCNN layer and compresses the neural descriptor.
 18. The method of claim11, further comprising: extracting a stored feature for the data storedin the memory; and comparing the stored feature with the feature of thefirst data.
 19. The method of claim 18, further comprising: calculatinga Hamming distance for the data stored in the memory.
 20. The method ofclaim 19, further comprising: selecting the matching data from the datastored in the memory based on the Hamming distance.